import { createRouter, createWebHistory } from 'vue-router'
const home = () => import('views/Home/Home')
const goods = () => import('views/Goods/Goods')
const grid = () => import('views/Grid/Grid')
const user = () => import('views/User/User')

const routes = [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '/home',
    name: 'home',
    component: home
  },
  {
    path: '/grid',
    name: 'grid',
    component: grid
  },
  {
    path: '/goods',
    name: 'goods',
    component: goods
  },
  {
    path: '/user',
    name: 'user',
    component: user
  },
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes,
})

export default router
